home *** CD-ROM | disk | FTP | other *** search
- Path: news.uiowa.edu!usenet
- From: Artur Wojdat <awojdat@lava.weeg.uiowa.edu>
- Newsgroups: comp.lang.c,comp.unix.programmer
- Subject: Q: '\n' character
- Date: Tue, 02 Apr 1996 10:18:11 -0800
- Organization: University of Iowa, Iowa City, IA, USA
- Distribution: world
- Message-ID: <31616F63.481D@lava.weeg.uiowa.edu>
- NNTP-Posting-Host: 128.255.149.126
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Hello everybody,
- Is there a function or some sort of way that I could remove '\n'
- charecter form the end of the string. I'm reading from two files, want to
- form one line of text and then have it printed out to stdout. I use fgets to
- read from the file and I noticed that it appends newline char at the end.
- It is important that two lines of text, one from each file, will be
- combined into one and I can't do it because the first string has '\n' added
- to it. I'm picky becauuse the output will be used to feed another program and
- I'm affraid that not properly formatted input may corrupt the process.
- Any suggestions will be greatly appreciated .. Thanks, Art ...
-